module dactor.log;

private import std.stdio;
private import std.string;
private import core.sys.posix.unistd;
private import core.sys.posix.pthread;

void logDebug(S...)(S s) {
    log("DEBUG", s);
}

void logInfo(S...)(S s) {
    log(" INFO", s);
}

void logWarn(S...)(S s) {
    log(" WARN", s);
}

void logError(S...)(S s) {
    log("ERROR", s);
}

private
void log(S...)(string level, S s) {
    writef(level ~ ": %d ", cast(uint)pthread_self());
    writefln(s);
}

